package com.xu.cloud.common.feign;

import com.xu.cloud.common.constant.HttpConstant;

/**
 * feign请求配置
 *
 * @author xuguan
 * @since 2025/3/19
 */
public class FeignRequestOption extends feign.Request.Options {
    /**
     * 默认请求建立连接超时时间(3秒)
     */
    private static final int CONNECT_TIMEOUT = HttpConstant.CONNECT_TIMEOUT;
    /**
     * 默认请求读取响应超时时间(10秒)
     */
    private static final int READ_TIMEOUT = HttpConstant.READ_TIMEOUT;

    @Override
    public int connectTimeoutMillis() {
        return CONNECT_TIMEOUT;
    }

    @Override
    public int readTimeoutMillis() {
        return READ_TIMEOUT;
    }
}
